package com.yc.mvc.web;

import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

// @RestController 是 @Controller 的子类
@RestController
// RestController 表示内部的方法，默认返回json格式数据
public class HelloAction {

    // @WebServlet("/hello.do")
    @RequestMapping("hello.do")
    public String hello(){
        return "hello world";
    }


}
